import request from '@/utils/request'


export default () => ({
  //模版新增
  PROJECT_TEMPLATE_CREATE:function (data) {
    return request({
      url: `/project-template/create`,
      method: 'post',
      data
    })
  },

  //模版更新
  PROJECT_TEMPLATE_UPDATE:function (data) {
    return request({
      url: `/project-template/update`,
      method: 'put',
      data
    })
  },

  //模版更新状态
  PROJECT_TEMPLATE_STATUS:function (id) {
    return request({
      url: `/project-template/update-status?id=${id}`,
      method: 'get',
    })
  },

  //模版详情
  PROJECT_TEMPLATE_DETAIL:function (id) {
    return request({
      url: `/project-template/detail?id=${id}`,
      method: 'get',
    })
  },

  //模版删除
  PROJECT_TEMPLATE_DELETE:function (id) {
    return request({
      url: `/project-template/delete?id=${id}`,
      method: 'delete',
    })
  },

  //模版列表
  PROJECT_TEMPLATE_LIST:function (data) {
    return request({
      url: `/project-template/list`,
      method: 'post',
      data
    })
  },

  //检测模版名称
  PROJECT_TEMPLATE_EXIST:function (name,id) {
    return request({
      url: `/project-template/exist?name=${name}&id=${id}`,
      method: 'get',
    })
  },
})
